home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 20 / 020.d81 / space gorn (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  8KB  |  278 lines

  1. 1 rem
  2. 2 rem
  3. 3 remspacegorn
  4. 4 rem
  5. 5 remby
  6. 6 rem
  7. 7 remanthonychiang
  8. 8 rem
  9. 9 rem
  10. 10 print"[147]     [211]      [208]      [193]      [195]      [197]"
  11. 20 print"       [199]       [207]       [210]       [206]"
  12. 22 print"    [204][207][193][196][211][212][193][210] is not public domain."
  13. 24 print"  [208]lease respect the author's rights."
  14. 30 rem       fork=1to3000:next
  15. 40 print""spc(10)"by [193]nthony [195]hiang"
  16. 50 printtab(7);"[195]hiang [205][201][206][201]-[193][196][214][197][206][212][213][210][197] #1"
  17. 60 fork=1to3100:next:printchr$(14)
  18. 70 gosub7000
  19. 99 rm=1:rb=1:n=16:v=14:dg=2:sw$="sna"
  20. 100 dimgq(9,6),noun$(30),verb$(30),message$(20),ob$(20),ob(20),fg(20)
  21. 105 fork=1to11:readob$(k),ob(k):nextk
  22. 110 fork=1to9:fork1=1to6:readgq(k,k1):nextk1:nextk
  23. 120 fork=1tov:readverb$(k):next:fork=1ton:readnoun$(k):next
  24. 130 fork=1to20:readme$(k):fg(k)=1:next:fork=1to6:readdi$(k):nextk
  25. 136 print"[208]ress [210][197][212][213][210][206] to start                                  ";
  26. 137 getkk$
  27. 138 ifkk$<>chr$(13)then137
  28. 140 rem
  29. 150 remmainsubroutine
  30. 160 rem
  31. 170 forpower=45to0step-1
  32. 180 gosub3000:remcommands
  33. 190 nextpo:goto4420
  34. 200 rem
  35. 210 remroomsubroutine
  36. 220 rem
  37. 225 print"[147]"
  38. 230 onrmgosub300,400,500,600,700,800,900,1000,1100
  39. 240 rb=0:goto2000
  40. 300 print"[217]ou're inside the ship's dock":return
  41. 400 print"[217]ou're in the main hallway":return
  42. 500 print"[217]ou're in the navagation room":return
  43. 600 print"[217]ou're in the captain's bedroom":return
  44. 700 print"[217]ou're in the bathroom":return
  45. 800 print"[217]ou're in a empty storage room":return
  46. 900 print"[217]ou're in the communications room":return
  47. 1000 print"[217]ou're in the end of the main hallway":return
  48. 1100 print"[217]ou're in the computer room":return
  49. 2000 rem
  50. 2010 remexits&objects
  51. 2020 rem
  52. 2030 print:print"[207]bvious [197]xits:"
  53. 2040 fork=1to6:ifgq(rm,k)<>0thenprintdi$(k);" ";
  54. 2043 nextk:print
  55. 2045 fork=1to11:ifob(k)=rmthen2050
  56. 2049 nextk:goto2080
  57. 2050 print:print"[214]isible [201]tems:"
  58. 2060 fork=1to11:print"";
  59. 2062 ifob(2)=rmandk=2thenprintob$(2);" on the wall":goto2070
  60. 2064 ifob(k)=rmthenprintob$(k)
  61. 2070 nextk:print
  62. 2080 return
  63. 2100 data "fresh batteries",3,"picture of [215]illiam [211]hatner",4,"combination safe"
  64. 2105 data 0,disintegration gun,0
  65. 2110 data lazer key,5,safe's combination,0,locked door,8,open door,0,open safe
  66. 2115 data 0,"[194]ig [213]gly [211]pace [199]orn",9,telecomputer,7
  67. 2120 data2,0,0,0,0,0
  68. 2130 data8,1,4,6,3,0
  69. 2140 data0,0,0,0,0,2
  70. 2150 data0,5,0,2,0,0
  71. 2155 data4,0,0,0,0,0
  72. 2160 data7,0,2,0,0,0
  73. 2170 data0,6,8,0,0,0
  74. 2180 data0,2,0,7,0,0
  75. 2190 data0,8,0,0,0,0
  76. 2200 data get,tak,goz,wal,mov,use,unl,ope,fir,sho,kil,rea,dro,thr
  77. 2210 data bat,pic,saf,gun,key,com,doo,nor,sou,eas,wes,upz,dow,tel,gor,inv
  78. 2220 data "[201] don't see it here"
  79. 2230 data "[201] can't do that"
  80. 2240 data "[201]t's locked"
  81. 2250 data "[201]t's open"
  82. 2260 data "[212]here's something behind it"
  83. 2270 data "[201]'ve no batteries"
  84. 2280 data "[201] can't go in that direction"
  85. 2290 data "[217]ou use word(s) [201] don't know"
  86. 2300 data "[201] don't understand your command"
  87. 2310 data "[208]lease use two words"
  88. 2320 data "[212]he ship's power is running low"
  89. 2330 data "[212]here's nothing here to open"
  90. 2340 data "[212]he gun disintegrates in yourhand!"
  91. 2350 data "[206]othing happens"
  92. 2360 data "[217]ou're already carrying it"
  93. 2370 data "[201]'m not carrying it"
  94. 2380 data "[201] have no immediate use for that"
  95. 2390 data "[193]re you crazy!?"
  96. 2400 data "[212]here's something inside"
  97. 2410 data "[212]he batteries are now in the gun"
  98. 2420 data "[206]orth","[211]outh","[197]ast","[215]est","[213]p","[196]own"
  99. 3000 rem 
  100. 3010 rem     commands
  101. 3020 rem 
  102. 3030 if rb = 1 then  gosub 225
  103. 3037 if power < 10 and po / 3 =  int (po / 3) then  print :printme$(11)
  104. 3040 print:print"[212]ell me what to do:";:input"";a$:ifa$="quit"thengosub 60000
  105. 3042 ifa$="quit"then3000
  106. 3050 ifleft$(a$,1)=" "thena$=right$(a$,len(a$)-1):goto3050
  107. 3051 iflen(a$)>1then3060
  108. 3052 ifmid$(a$,1,1)="s"thenkn=9:goto3600
  109. 3053 ifmid$(a$,1,1)="e"thenkn=10:goto3600
  110. 3054 ifmid$(a$,1,1)="w"thenkn=11:goto3600
  111. 3055 ifmid$(a$,1,1)="u"thenkn=12:goto3600
  112. 3056 ifmid$(a$,1,1)="d"thenkn=13:goto3600
  113. 3057 ifmid$(a$,1,1)="n"thenkn=8:goto3600
  114. 3058 ifmid$(a$,1,1)="i"then3507
  115. 3059 goto3090
  116. 3060 ifleft$(a$,4)="look"thenrb=1:goto3030
  117. 3061 ifmid$(a$,1,3)="inv"ora$="inventory"then3507
  118. 3067 ifsw$+left$(a$,2)<>"snafu"then3069
  119. 3068 ifmid$(a$,3,1)=chr$(67)andmid$(a$,4,1)=chr$(75)then3770
  120. 3069 iflen(a$)<5then3090
  121. 3070 fork=1tolen(a$):ifmid$(a$,k,1)=" "then3100
  122. 3080 next
  123. 3090 print:printme$(10):goto3040
  124. 3100 v$=left$(a$,k-1):n$=right$(a$,len(a$)-k)
  125. 3112 ifv$="go"thenv$=v$+"z"
  126. 3117 ifn$="up"thenn$=n$+"z"
  127. 3120 iflen(n$)<3orlen(v$)<3then3090
  128. 3125 v$=left$(v$,3):n$=left$(n$,3)
  129. 3130 rem
  130. 3140 remcheckingverbs
  131. 3150 rem
  132. 3155 ifv$="att"orv$="fig"thenv$="kil"
  133. 3160 forkv=1tov
  134. 3170 ifv$=verb$(kv)then3200
  135. 3180 nextkv:goto3590
  136. 3190 rem
  137. 3200 remcheckingnouns
  138. 3210 rem
  139. 3213 ifn$="laz"thenn$="key"
  140. 3215 ifn$="spa"thenn$="gor"
  141. 3220 forkn=1ton
  142. 3230 ifn$=noun$(kn)then3250
  143. 3240 nextkn:goto3590
  144. 3250 onkvgoto3500,3500,3600,3600,3600,3700,3800,3800,3900,3900,4000,4050,4100
  145. 3260 ifkv=14then4100
  146. 3500 remgetandtake
  147. 3505 ifkn<>16then3520
  148. 3507 print"[147][217]ou are carrying:":print
  149. 3510 fork=1to10:ifob(k)=-1thenprintob$(k)
  150. 3511 next:goto3000
  151. 3520 ifkn<14andkn>7then4300
  152. 3525 ifkn=3orkn=14orkn=7thenprintme$(2):goto4500
  153. 3530 ifob(kn)=-1thenprintme$(15):goto4500
  154. 3535 ifob(kn)<>rmthenprintme$(1):goto4500
  155. 3540 ifnot(kn=2andfg(1)=1andrm=4)then3543
  156. 3541 printme$(5):ob(2)=-1:ob(3)=4:fg(1)=0:fork=1to2000:next:goto4500
  157. 3543 iffg(2)<>1then3555
  158. 3544 ifnot(kn=4andob(1)=-1orkn=1andob(4)=-1)then3555
  159. 3545 ob(1)=0:print:printme$(20):fg(2)=0:ob(4)=-1:goto4500
  160. 3555 ifkn=15then4000
  161. 3560 ob(kn)=-1:print:print"[207]k!":goto4500
  162. 3590 print:printme$(8):goto3040
  163. 3600 remmovegoandwalk
  164. 3605 ifrm=8andkn=7thenkn=8
  165. 3610 ifkn<8orkn>13then4300
  166. 3620 x=kn-7
  167. 3630 ifgq(rm,x)=0thenprintme$(7):goto4500
  168. 3640 rm=gq(rm,x)
  169. 3650 rb=1:goto4500
  170. 3700 remuse
  171. 3710 ifkn=14andrm=7then4050
  172. 3720 ifkn<4orkn>6then4300
  173. 3740 ifkn=4then3900
  174. 3750 ifkn=5thenkn=7:goto3800
  175. 3760 ifkn=6then4050
  176. 3770 print:print"[201] am not that kind of gorn!":po=po-5:goto4500
  177. 3800 remunlockandopen
  178. 3803 ifkn=2andob(2)=-1andob(6)=0thenob(6)=rm:fg(5)=0:goto8000
  179. 3804 ifkn=2andob(2)<>-1thenprintme$(16):goto4500
  180. 3805 ifkn<>7andkn<>3andkn<>2then3830
  181. 3808 ifkn=2andfg(5)=0then3850
  182. 3810 ifnot(kn=7andrm=8andob(5)=-1)then3815
  183. 3811 gq(8,1)=9:ob(7)=0:ob(8)=8:print:printme$(4):goto4500
  184. 3815 ifnot(kn=3andrm=4andfg(3)=0)then3820
  185. 3816 print:printme$(4):print:printme$(19):ob(3)=0:ob(4)=4:ob(9)=4:goto4500
  186. 3820 ifnot(kn=7andrm<>8orkn=3andrm<>4)then3825
  187. 3821 print:print"[212]here's nothing here to open":goto4500
  188. 3825 print:printme$(3):goto4500
  189. 3830 ifkn=14thenprint:print"[206]othing here but us silicon chips":goto4500
  190. 3840 ifkn>7orkn=1orkn=5orkn=3then4300
  191. 3850 print:print"[212]here's nothing important inside":goto4500
  192. 3900 remfireandshoot
  193. 3910 ifkn<>4andkn<>15then4300
  194. 3920 ifob(4)<>-1thenprint:printme$(16):goto4500
  195. 3930 iffg(2)=1thenprint:printme$(6):goto4500
  196. 3940 print:printme$(13):ob(4)=0:goto4500
  197. 4000 remkill
  198. 4005 ifkn<>15then4300
  199. 4010 ifrm<>9thenprint:print"[212]he gorn's not here":goto4500
  200. 4015 printme$(18);:inputqa$
  201. 4018 ifleft$(qa$,1)="y"then4030
  202. 4020 ifleft$(qa$,1)="n"then3000
  203. 4025 print"[193]nswer the question: ";:goto4015
  204. 4030 print:print"[212]oo bad. [212]he space gorn's favorite food is looney under glass."
  205. 4031 print"[217]ou have just been made lunch."
  206. 4032 print"[195]homp! [195]homp!":goto4490
  207. 4050 remread
  208. 4055 ifkn=6andob(6)=-1thenfg(3)=0:print:print"it's 45-21-47 ":goto4500
  209. 4060 ifkn=6thenprint:printme$(16):goto4500
  210. 4065 ifkn<>14thenprint:print"[217]ou don't need to read that":goto3000
  211. 4070 ifrm<>7thenprint:printme$(1):goto4500
  212. 4072 dd=int(rnd(1)*2):ifdd=1then4080
  213. 4075 print:print"[201]t says:";:print"   [212]he combination is inside  [146]"
  214. 4076 printtab(9);"  [212]he picture of [215]illiam     [146]"
  215. 4077 printtab(9);"         [211]hatner             [146]":goto4500
  216. 4080 print:print"[201]t says:   [196]isintegration only way    [146]"
  217. 4081 printtab(9);"    to kill space gorn       [146]":goto4500
  218. 4100 remdropthrow
  219. 4110 ifkn>6orkn=3then4300
  220. 4120 ifob(kn)<>